package com.cola.SystemRuntimeDemo;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;

/**
 * @Grup:com.cola.SystemRuntimeDemo
 * @Auther:cola
 * @Data:2021/3/16-2021-03-16:24
 * @version:1.0
 */
public class SystemRuntimeDemo {
    public static void main(String[] args) {
        System.err.println("出错了");
        System.out.println("向控制台食输出");
        int []num1={1,2,3,4,5,6,7,8};
        int[] num2=new int[num1.length];
        //参数()
        System.arraycopy(num1,0,num2,0,num1.length);
        System.out.println(Arrays.toString(num2));
        Date nowDate=new Date(System.currentTimeMillis());
        DateFormat df=new SimpleDateFormat("HH:mm:ss");
        String now=df.format(nowDate);
        System.out.println(now);
        //System.exit(0);
        Runtime rt=Runtime.getRuntime();
        System.out.println("处理器数量:"+rt.availableProcessors());
    }
}
